package cn.netjava.blogaction;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import cn.netjava.actioninterface.Action;
import cn.netjava.dao.ArticleDao;
import cn.netjava.pojo.Article;
/**
 * this action is use for dealing with study's articles
 * @author Administrator
 *
 */
public class BlogStudyAction implements Action{

	public String excute(HttpServletRequest request,
			HttpServletResponse response) {
		
		/*obtain the all life's articles according the life column then puts it into session object*/
		ArticleDao adao =ArticleDao.getArticleDao();
		List<Article> articleListAboutStudy =adao.getAllArticleFromColumn("ѧϰ");
		request.setAttribute("allstudyarticles", articleListAboutStudy);
		
		return "JSP/blogjsp/blogstudy.jsp";
	}

}
